#pragma once

class CFire
{

public:
	///
	CFire();
	///
	~CFire();

public:
	///
	void Init(int sx, int sy);
	///
	void SetSparks(int Sparks);
	///
	int* GetFireMask();
	///
	int* GetImageMask();

public:
	///
	BOOL Draw(HDC hdc, int x, int y);
	///
	void SetPixel(int x, int y, BYTE bPixel);

protected:
	// Fire width
	int m_dwFireSx;
	// Fire height
	int m_dwFireSy;

	DWORD dwSize;

	// Number of sparks
	int m_nSparks;

	// Pointers at bit arrays
	BYTE *pArray1;
	BYTE *pArray2;
	BYTE* pCurrent;

	///
	DWORD m_dwPalette[256];

	///
	DWORD *m_pBits;

	//
	int *m_pFireMask;

	//
	int *m_pImageMask;

	//
	CDC hFireDC;
	CBitmap hbmpFire;
	BITMAPINFO *m_pBitmapInfo;
};
